package com.woniuxy.bookmall.mapper;

import com.woniuxy.bookmall.entity.TUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

public interface TUserMapper extends Mapper<TUser> {

    @Select("select * from t_user where (account = #{name} or email = #{name}) and password = #{pass}")
    TUser selectUserByNameAndPass(@Param("name") String username, @Param("pass") String password);

    @Select("select * from t_user where email = #{value}")
    TUser selectUserByEmail(String email);
}